import java.io.File;
import java.io.IOException;

public class Demo5 {
    public static void main(String[] args) throws IOException {
        File f1 = new File("./test.txt");
        //f1.createNewFile();
        File f2 = new File("./test1Dir/test1.txt");
        //f2.createNewFile();
        f1.renameTo(f2);
    }
}
